$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("p_form_wgpj_m")
    const dgrid1 = $NG.getCmpApi("p_form_wgpj_d1")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()


    if(page.oType == 'add'){
        getDetail()
    }

    // 获取对照表数据
    function getDetail(){
        $NG.execServer("SELECT",{sql:`select u_pjyj from p_form_wgpjdzb_d1`},(res)=>{
            if(res.count == 0) return 
            const datas = JSON.parse(res.data).reduce((value,item)=>{
                value.push({...item.extendObjects})
                return value
            },[])
            dgrid1.clearRows().then(()=>{
                dgrid1.addRows(datas)
            })
        })
    }
})